 <%@ page contentType="text/html; charset=UTF-8"%>
 <%@ taglib prefix="s" uri="/struts-tags"%>
 <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
 <html>
    <head>
       <link href="
       <s:url value="resources/css/main.css"/>
       " rel="stylesheet" type="text/css"/>
    </head>
    <body>
       <center>

          <table align=center>
             <tr>
                <td>
                   <h1>
                      <s:if test="supplier==null || supplier.id == null">
                         <s:text name="label.supplier.add"/>
                      </s:if>
                      <s:else>
                         <s:text name="label.supplier.edit"/>
                      </s:else>
                   </h1>
                </td>
             </tr>
          </table>
          <table width=600 align=center>
             <tr>
                <td><a href="getAllSuppliers.html">Click Here to View Supplier</a></td>
             </tr>
          </table>
          <table>
             <tr>
                <td align="left" style="font:bold;color:red">
                   <s:fielderror/>
                   <s:actionerror/>
                   <s:actionmessage/>
                </td>
             </tr>
          </table>
          <s:form>
             <table align="center" class="borderAll">
                <s:hidden name="supplier.id" />
                <s:hidden name="criteria" value="A0"/>
                <s:hidden name="criteriaSubId" value="1"/>

                <tr>
                   <td class="tdLabel">
                      <s:text name="label.supplier.firstName"/>
                   </td>
                   <td>
                      <s:textfield name="supplier.firstName" size="30"/>
                   </td>
                </tr>
                <tr>
                   <td class="tdLabel">
                      <s:text name="label.supplier.lastName"/>
                   </td>
                   <td>
                      <s:textfield name="supplier.lastName" size="30"/>
                   </td>
                </tr>
                <tr>
                   <td class="tdLabel">
                      <s:text name="label.supplier.registrationDate"/>
                   </td>
                   <td>
                       <s:textfield name="supplier.registrationDate" size="10" />
                   </td>
                </tr>
                <tr>
                   <td class="tdLabel">
                      <s:text name="label.supplier.contactInfo"/>
                   </td>
                   <td>
                      <s:select name="supplier.contactInfo.contactInfoId"
                         list="#session.contactInfoList"
                         listKey="contactInfoId"
                         listValue="contactInfoId"
                         multiple="false"
                         />
                   </td>
                </tr>

                <tr>
                   <td class="tdLabel">
                      <s:text name="label.supplier.supplierCode"/>
                   </td>
                   <td>
                      <s:textfield name="supplier.supplierCode" size="10" />
                   </td>
                </tr>

                <tr>
                   <td class="tdLabel">
                      <s:text name="label.supplier.backListed"/>
                   </td>
                   <td>
                      <s:textfield name="supplier.backListed" size="10" />
                   </td>
                </tr>

                <tr>
                   <td class="tdLabel">
                      <s:text name="label.supplier.items"/>
                   </td>
                   <td>
                      <s:select name="supplier.itemIdList"
                         list="#session.itemIdList"
                         headerKey=""
                         headerValue=""
                         multiple="true"
                         />
                   </td>
                </tr>




             </table>
             <br/>
             <table>
                <tr>
                   <td>

                    <s:if test="supplier==null || supplier.id == null">
                                <s:submit action="supplierInsert" key="button.label.submit" cssClass="butStnd"/>
                                         </s:if>
                                         <s:else>
                                  <s:submit action="supplierUpdate" key="button.label.submit" cssClass="butStnd"/>
                                         </s:else>

                   </td>
                   <td>
                      <s:reset key="button.label.cancel" cssClass="butStnd" action="supplierInsertOrUpdate" />
                   </td>
                <tr>
             </table>
          </s:form>
       </center>
    </body>
 </html>